/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ejercicios;

import java.util.Scanner;

/**
 *
 * @author zpiik3
 */
public class Palindromo {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {


        Scanner esc= new Scanner(System.in);
             char cad;
             String cadena="";
        System.out.println("introdusca un palindromo ");
        String cadena1=esc.next();

       char arreglo[]=cadena1.toCharArray();

       for(int x=arreglo.length-1;x>=0;x--){


           cad=arreglo[x];

           cadena += Character.toString(cad);


       }
System.out.println(cadena1.equals(cadena));
        System.out.println(" palindromo : "+cadena1+"\n alreves  "+cadena);

    }

}
